﻿using System;
using System.Windows.Forms;

namespace Groove.Winform
{
    public partial class FrmInfo : Form
    {
        public string InfoText
        {
            get => lblInfo.Text;
            set => lblInfo.Text = value;
        }

        public FrmInfo()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }
    }

    public static class FormInfoDialogExtension
    {
        public static void ShowInfo(this Form frm, string info)
        {
            var frmInfo = new FrmInfo()
            {
                InfoText = info
            };
            frmInfo.ShowDialog(frm);
        }
    }
}
